\documentclass[a4paper]{article}
\usepackage{listings}
\usepackage{xcolor}
\lstset{
	%行号
		numbers=left,
		%背景框
			framexleftmargin=10mm,
		frame=none,
		%背景色
			%backgroundcolor=\color[rgb]{1,1,0.76},
		backgroundcolor=\color[RGB]{245,245,244},
		%样式
			keywordstyle=\bf\color{blue},
		identifierstyle=\bf,
		numberstyle=\color[RGB]{0,192,192},
		commentstyle=\it\color[RGB]{0,96,96},
		stringstyle=\rmfamily\slshape\color[RGB]{128,0,0},
		%显示空格
			showstringspaces=false
}

\begin{document}
\begin{lstlisting}[language={C}]
int main(int argc, char ** argv)
{
	//Print Hello world
	printf("Hello world!\n");
	int i;
	for(int j=0;j<10;j++)
	{
		printf("hello");
	}
	return 0;
}
\end{lstlisting}
\end{document}
